package com.hh.base.ui.bridge

/**
 * Create By hHui on 2025/4/9 10:33
 *
 * @description
 */
open class Event<out T>(private val content: T) {
    // 内部标记是否已处理
    var hasBeenHandled = false
        private set

    // 获取未被处理过的内容
    fun getContentIfNotHandled(): T? {
        return if (hasBeenHandled) {
            null
        } else {
            hasBeenHandled = true
            content
        }
    }
}